<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Methodology: Open the FCKDialog leak test for at least 3 minutes in IE6, see if the memory usage plataus or increases.

Tests done during floating dialog development:
1. Disabled all JavaScript from fckdialog.html/No noticeable increase.
2. Added domain relaxation script without local references/No noticeable increase or very very slight increase after 10 minutes.
3. Turn Args() and Editor() into functions, add FCK* references/No noticeable increase or very very slight increase after 10 minutes.
4. Added window.focus(), fck_dialog.css, and language direction/No noticeable increase after 10 minutes.
5. Added fck_dialog_ie6.js/Steadily increasing memory usage
6. Added Init(), Throbber(), ResizeContainerSize()/No noticeable increase after 10 minutes.
7. Added all resize logic, LoadInnerDialog() and InnerDialogLoaded(), created the Sizer and Main modules/No noticeable increase after 10 minutes.
8. Added drag and drop handlers/No noticeable increase (But I swear I saw it increasing eariler, with the same code!?!!)
9. Added logic for closing dialogs, cover blocks, disabling and enabling dialogs, and selection handler/No noticeable increase.
10. Added logic for handling tabs/No noticeable increase.
11. Added context menu blocker and Enter and Esc hotkeys/No noticeable increase.
-->
<head>
	<title>FCKeditor - Sample</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex, nofollow" />
	<link href="test1.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../../../fckeditor.js"></script>
</head>
<body>
	<h1>
		FCKDialog Memory Leak Test
	</h1>
	<div>
		A dialog is opened and closed quickly in this page, see if there's any memory leak in taskmgr. If you see
		a JavaScript error popping up from IE, reopen the IE window and do the test again.
	</div>
	<hr />
	<form action="sampleposteddata.asp" method="post" target="_blank">
		<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_test')) ;

var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath	= sBasePath ;
oFCKeditor.Height	= 300 ;
oFCKeditor.Value	= '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
oFCKeditor.Create() ;

var OpenDialog = true ;
var RefreshFunc = function()
{
	if ( OpenDialog )
		FCKeditorAPI.GetInstance( 'FCKeditor1' ).Commands.GetCommand( 'About' ).Execute() ;
	else
	{
		var iframes = document.getElementsByTagName( 'iframe' ) ;
		for ( var i = 0 ; i < iframes.length ; i++ )
		{
			if ( iframes[i].src.search( 'fckdialog.html' ) != -1 && iframes[i].contentWindow && iframes[i].contentWindow.CloseDialog )
				iframes[i].contentWindow.CloseDialog() ;
		}
	}
	OpenDialog = !OpenDialog ;
}

var StartTest = function()
{
	setInterval( RefreshFunc, 200 ) ;
}

var FCKeditor_OnComplete = function()
{
	setTimeout( StartTest, 3000 );
}

//-->
		</script>
		<br />
		<input type="submit" value="Submit" />
	</form>
</body>
</html>
